#!/usr/bin/env python
# vim:fileencoding=utf-8

from calibre.web.feeds.news import BasicNewsRecipe


class InterfaxUAUA(BasicNewsRecipe):
    title = '\u0406\u043D\u0442\u0435\u0440\u0444\u0430\u043A\u0441-\u0423\u043A\u0440\u0430\u0457\u043D\u0430'
    __author__ = 'bugmen00t'
    description = '\u0406\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u044F \u043F\u0440\u043E \u043E\u0441\u0442\u0430\u043D\u043D\u0456 \u043F\u043E\u0434\u0456\u0457 \u0432 \u043F\u043E\u043B\u0456\u0442\u0438\u0446\u0456 \u0423\u043A\u0440\u0430\u0457\u043D\u0438, \u043A\u043B\u044E\u0447\u043E\u0432\u0456 \u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0456 \u0435\u043A\u043E\u043D\u043E\u043C\u0456\u0447\u043D\u0456 \u043D\u043E\u0432\u0438\u043D\u0438 \u0442\u0430 \u043E\u0441\u043D\u043E\u0432\u043D\u0456 \u043F\u043E\u0434\u0456\u0457 \u0432 \u043A\u0440\u0430\u0457\u043D\u0430\u0445 \u0421\u041D\u0414 \u0456 \u0441\u0432\u0456\u0442\u0443.'  # noqa
    publisher = '\u0406\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u0439\u043D\u0435 \u0430\u0433\u0435\u043D\u0442\u0441\u0442\u0432\u043E \u00AB\u0406\u043D\u0442\u0435\u0440\u0444\u0430\u043A\u0441-\u0423\u043A\u0440\u0430\u0457\u043D\u0430\u00BB'  # noqa
    category = 'newspaper'
    cover_url = u'https://interfax.com.ua/static/articles/images/interfax_ukraine_logo_ukr.svg'
    language = 'uk'
    no_stylesheets = True
    remove_javascript = False
    auto_cleanup = False
    oldest_article = 2
    max_articles_per_feed = 30

    remove_tags_before = dict(
        name='article', attrs={'class': 'article article-content-view'}
    )

    remove_tags_after = dict(
        name='article', attrs={'class': 'article article-content-view'}
    )

    remove_tags = [
        dict(name='div', attrs={'class': 'grid article-content-secondary-header'}),
        dict(name='div', attrs={'class': 'article-tags'}),
    ]

    feeds = [(
        '\u041D\u043E\u0432\u0438\u043D\u0438',
        'https://interfax.com.ua/news/last.rss'
    )]
